package com.wsjj.yjh.server.impl;
import com.wsjj.yjh.bean.HbaseClinkhouseDorisDSTable;
import com.wsjj.yjh.bean.HiveTable;
import com.wsjj.yjh.mapper.HbaseClikhouseDorisDSTableMapper;
import com.wsjj.yjh.mapper.HiveTableMapper;
import com.wsjj.yjh.server.HbaseClickhouseDorisDSTableServer;
import com.wsjj.yjh.server.HiveTableServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Random;

@Service
public class HbaseClickhouseDorisDSTableServerImpl implements HbaseClickhouseDorisDSTableServer {

    @Autowired
    private HbaseClikhouseDorisDSTableMapper HbaseClikhouseDorisDSTableMapper;


    @Override
    public HbaseClinkhouseDorisDSTable selectById() {
        Integer coumt = HbaseClikhouseDorisDSTableMapper.selectCoumt();
        Random random = new Random();
        int id = random.nextInt(coumt);

        return HbaseClikhouseDorisDSTableMapper.selectById(id+1);
    }
}
